<!-- AccumulatePointsList.html -->
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
		<title>师傅端报告已审阅列表</title>
		<link rel="stylesheet" href="../../css/mui.min.css"/>
		<link rel="stylesheet" href="../../css/CFNetPP_Base.css">
		<style type="text/css">
			.content-div {
			}
			.loadFailure {
				left: 0;
				top: 0;
				margin: 0 auto;
				text-align: center;
				padding: 40px 20px;
				width: 100%;
			}
			.loadFailure img {
				max-width: 100%;
				display: inline-block;
			}
			.noSign {
				left: 0;
				top: 0;
				margin: 0 auto;
				text-align: center;
				padding: 40px 20px;
				width: 100%;
			}
			.noSign img {
				max-width: 100%;
				display: inline-block;
			}
			.rank-num {
				line-height: 42px;
				padding-right: 10px;
				width: 20px;
			}
			.user-icon {
				border-radius: 50%;
				height: 44px;
				width: 44px;
				margin-top: 2px
			}
			.user-name {
				font-size: 16px;
			}
			.a-p-right-div {
				text-align: right;
			}
			.accmulate-point-title {
				color: #18b4ed;
			}
			.accmulate-point-num {
				font-size: 16px;
			}
			.load-more-div {
				height: 40px;
				background-color: white;
			}
			.load-more-cell {
				line-height: 40px;
				text-align: center;
			}
			.content-top-div {
				height: 34px;
				line-height: 20px;
				position: relative;
			}
			.current-a-p {
				color: #18b4ed;
				text-align: center;
			}
			p {
				font-size: 12px;
				margin-bottom: 0;
			}
			.all-peoples-num {
				float: right;
			}
			.self-title {
				color: #ee0000;
			}
			.add-user-div {
				position: absolute;
				right: -10px;
				top: -10px;
				width: 44px;
				height: 44px;
				display: none;
			}
			.add-user-img {
				position: absolute;
				right: 10px;
				top: 10px;
				width: 24px;
			}
			#top_div {
				height: 30px;
			}
			.info-span {
				margin-left: 5px
			}
			.entry_tiem_div {
				margin-top: 7px;
			}
			.entry_tiem_div span {
				font-size: 14px
			}
			.college_div {
				margin-top: 1px;
			}
			.college_div span {
				font-size: 14px
			}
			.mui-table-view-cell:active {
				background: #fff;
			}
			.font_balck {
				color: #000000
			}
			.time_div {
				float: left;
				width: 35%;
				padding: 15px 0;
			}
			.mui-table-view-cell > a:not(.mui-btn) {
				margin-right: -35%;
			}
			.time_div  span {
				color: #000000;
				font-size: 14px;
			}
			.user-name {
				font-size: 14px;
				margin-left: 1px;
			}
			.people_em {
				margin-left: 2px;
			}
			.info-span {
				margin-top: 5px;
				font-size: 12px;
				margin-left: 2px;
			}
			.user-icon {
				border-radius: 50%;
				margin-top: 3px;
			}
			.two_content_div {
				width: 40%;
				float: left;
				padding-top: 2px;
			}
		</style>
	</head>
	<body>
		<div class="content-div">
			<ul id="list_div" class="mui-table-view ">
				<!--	<li class="mui-table-view-cell mui-media">
				<a href="javascript:;"> <img class="mui-media-object mui-pull-left user-icon" src="../../image/icon_teacher_normal.png">
				<div class="mui-media-body">
				<div style="width: 40%;float: left">
				<span class="user-name">张三</span>
				<p class="mui-ellipsis entry_tiem_div" >
				<span class="left-span">岗位:</span>
				<span class="info-span">程序员</span>
				</p>
				</div>
				<div class="time_div" >
				<span >2018-12-28  18:23</span>
				</div>
				</div> </a>
				</li>-->
			</ul>
		</div>
		<div class="noSign" hidden="hidden" id="noData">
			<img src="../../image/icon_no_data.png" width="60%">
			<p class="font16 top_15 base_dark_grey" >
				暂无数据
			</p>
		</div>
		<div class="loadFailure" hidden="hidden" id="noNet">
			<img src="../../image/icon_img01.png" width="60%">
			<p class="" >
				数据加载失败
			</p>
			<p>
				请检查您的网络
			</p>
			<button type="button" class="mui-btn mui-btn-outlined" onclick="refreshData()">
				重新加载
			</button>
		</div>
	</body>
	<script type="text/javascript" src="../../script/jquery.min.js"></script>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script type="text/javascript" src="../../script/MD5.js"></script>
	<script type="text/javascript" src="../../script/requestTool.js"></script>
	<script type="text/javascript" src="../../script/common.js"></script>
	<script type="text/javascript" src="../../script/timeStampTool.js"></script>
	<script type="text/javascript">
		var page = 1;
		var rows = 10;
		var refreshCount = 0;
		var sid = '';
		var firstLoad = true;
		apiready = function() {
			loadNewData();
			setRefreshHeader();
			setPullUpRefresh();
			receNotifi();
		}
		function receNotifi() {
			api.addEventListener({
				name : 'MasterReportListNotifi'
			}, function(ret, err) {
				refreshData();
			});
		}

		//下拉刷新
		function setRefreshHeader() {
			api.setRefreshHeaderInfo({
				visible : true,
				bgColor : '#ccc',
				textColor : '#fff',
				textDown : '下拉刷新...',
				textUp : '松开刷新...',
				showTime : true
			}, function(ret, err) {
				loadNewData();
			});
		}

		// 上拉加载
		function setPullUpRefresh() {
			api.addEventListener({
				name : 'scrolltobottom'
			}, function(ret, err) {
				if (refreshCount >= rows) {
					loadMoreData();
				}
			});
		}

		function loadNewData() {
			page = 1;
			loadData();
		}

		function loadMoreData() {
			page++;
			loadData();
		}

		//获取数据
		function loadData() {
			if (firstLoad == true) {
				showProgress();
				firstLoad = false;
			}
			var params = {
//			    jid : $api.getStorage('cfnetppjid'),
				uid : $api.getStorage('cfnetppuid'),
				page : page,
				rows : rows,
				qyreviewstatus  : 1 //审核状态的报告列表
			};
			cfnetppPOST(url_sflst, params, true, function(data, status) {
//			popu(params);
//			popu(data);
				api.hideProgress();
				api.refreshHeaderLoadDone();
				if (status == 'success') {
					if (data.status == 1) {
						var dataArray = data.json;
						var listdata = dataArray.lst;
						if (listdata != '' && listdata.constructor == Array && listdata.length > 0) {
							refreshCount = listdata.length;
							writelist(listdata, refreshCount);
						} else {
							if (page == 1) {
								$('#noData').show();
								$('#noNet').hide();
							}
						}
					} else if (data.code = 108) {
						if (page == 1) {
							$('#noData').show();
							$('#noNet').hide();
							$('#list_div').html('');
						}
					} else {
						if (page == 1) {
							$('#noData').show();
							$('#noNet').hide();
							$('#list_div').html('');
						}
					}
				} else {
					if (page > 1) {
						page--;
						refreshCount = rows;
						api.toast({
							msg : '网络异常'
						});
					} else {
						$('#noData').hide();
						$('#noNet').show();
						$('#list_div').html('');
					}
				}
			});
		}

		function refreshData() {
			firstLoad = true;
			$('#list_div').html('');
			loadNewData();
		}

		/*assessment_status 1 考核开始  0 未开始  -1 结束
		 exam_status 1通过 0 未通过 -1 未考试
		 exam_instime 交卷时间
		 fenshu 考试得分*/
		function writelist(listdata, len) {
			var htmlsdata = '';
			var timeStr = "";
			var typeStr = "";
			for (var i = 0; i < len; i++) {
				var data = listdata[i];
				var DataArr = JSON.stringify(data).replace(/"/g, '&quot;');
				timeStr = timeWithStamp3(data.instime);
				var htmls = '<li class="mui-table-view-cell mui-media" onclick="openwin(' + DataArr + ')">' 
				            + '<a href="javascript:;">' 
				            + ' <img class="mui-media-object mui-pull-left user-icon" src="' + HeadPortraitIsNull(data.picurl) + '">' 
				            + '<div class="mui-media-body">' 
				               + '<div style="width: 40%;float: left">' 
				                + '<span class="user-name">'+data.rename1+'</span>' 
				                 + '<p class="mui-ellipsis entry_tiem_div" >' 
//				                   + '<span class="left-span">岗位:</span>' 
				                   + '<span class="info-span">已审核</span>' 
				                   + '</p>' 
				              + '</div>' 
				              + '<div class="time_div" >' 
				                + '<span >'+timeStr+'</span>' 
				              + '</div>' 
				              + '</div> </a>' 
				          + '</li>'
				htmlsdata = htmlsdata + htmls;
			}
			if (page == 1) {
				$('#list_div').html(htmlsdata);
			} else {
				$('#list_div').append(htmlsdata);
			}
		}

		function openwin(data) {
		    data['sourceurl'] = window.location.pathname;
			data['sourcetitle'] = document.title;
			api.openWin({useWKWebView:true,
				name : 'Practice_MasterReportScore',
				url : 'Practice_MasterReportScore.html',
				pageParam:data,
				reload : true,
				allowEdit : true
			});
		}
	</script>
</html>